home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / text / tex / amiweb2c.lha / AmiWeb2c-2.1 / texmf / dvips / hps.pro < prev    next >
Encoding:
Text File  |  1998-03-14  |  3.5 KB  |  54 lines

  1. %!
  2. /HPSdict 20 dict dup begin /braindeaddistill 50 def /rfch{dup length 1
  3. sub 1 exch getinterval}bind def /splituri{dup(#)search{exch pop}{()exch}
  4. ifelse dup(file:)anchorsearch{pop exch pop 3 -1 roll pop false}{pop 3 -1
  5. roll exch pop true}ifelse}bind def /lookuptarget{exch rfch dup
  6. /TargetAnchors where{pop TargetAnchors dup 3 -1 roll known{exch get true
  7. }{pop(target unknown:)print == false}ifelse}{pop pop
  8. (target dictionary unknown\012)print false}ifelse}bind def /savecount 0
  9. def /stackstopped{count counttomark sub /savecount exch store stopped
  10. count savecount sub 1 sub dup 0 gt{{exch pop}repeat}{pop}ifelse}bind def
  11. /tempstring 256 string def /targetvalidate{1 index dup length 255 gt
  12. exch dup(/)search{pop pop pop exch pop true exch}{pop}ifelse cvn
  13. tempstring cvs token pop pop length 0 ne or not}bind def
  14. /targetdump-hook where{pop}{/targetdump-hook{dup mark exch gsave initmat
  15. setmatrix{{mark /Dest 4 2 roll targetvalidate{aload pop exch pop /Page 3
  16. 1 roll /View exch[exch /FitH exch]/DEST pdfmark}{cleartomark}ifelse}
  17. forall}stackstopped pop grestore}bind def}ifelse /baseurl{mark exch 1
  18. dict dup 3 -1 roll /Base exch put /URI exch /DOCVIEW{pdfmark}
  19. stackstopped pop}bind def /externalhack systemdict /PDF known def
  20. /oldstyle true def /initmat matrix currentmatrix def /actiondict 2 dict
  21. dup /Subtype /URI put def /weblinkhandler{dup 3 1 roll mark 4 1 roll
  22. /Title 4 1 roll splituri 3 -1 roll dup length 0 gt{cvn /Dest exch 4 2
  23. roll}{pop}ifelse{externalhack{/HTTPFile exch}{actiondict dup 3 -1 roll
  24. /URI exch put /Action exch}ifelse}{externalhack{/HTTPFile exch}{/File
  25. exch /Action /GoToR}ifelse}ifelse counttomark 2 sub -1 roll aload pop
  26. /Rect 4 1 roll /Border 3 1 roll /Color exch oldstyle{/LNK}{/Subtype
  27. /Link /ANN}ifelse gsave initmat setmatrix{pdfmark}stackstopped grestore}
  28. bind def /externalhandler where{pop}{/externalhandler{2 copy{
  29. weblinkhandler}exec{/externalhack externalhack not store 2 copy{
  30. weblinkhandler}exec{/externalhack externalhack not store /oldstyle false
  31. store 2 copy{weblinkhandler}exec{(WARNING: external refs disabled\012)
  32. print /externalhandler{pop pop}bind store externalhandler}{pop pop}
  33. ifelse}{pop pop /externalhack externalhack not store}ifelse}{pop pop
  34. /externalhandler{weblinkhandler pop}bind store}ifelse}bind def}ifelse
  35. /pdfmnew{dup type /stringtype eq{externalhandler}{exch dup rfch exch 3
  36. -1 roll lookuptarget{mark 4 1 roll /Title 4 1 roll aload pop exch pop
  37. /Page 3 1 roll /View exch[exch /FitH exch]5 -1 roll aload pop /Rect 4 1
  38. roll /Border 3 1 roll /Color exch /LNK gsave initmat setmatrix pdfmark
  39. grestore}{pop pop}ifelse}ifelse}bind def /pdfmold{dup type /stringtype
  40. eq{externalhandler}{exch dup rfch exch 3 -1 roll lookuptarget{mark 4 1
  41. roll /Title 4 1 roll aload pop exch pop /Page 3 1 roll /View exch[exch
  42. /FitH exch]5 -1 roll aload pop pop 0 3 getinterval /Rect 3 1 roll
  43. /Border exch /LNK gsave initmat setmatrix pdfmark grestore}{pop pop}
  44. ifelse}ifelse}bind def /pdfm where{pop}{/pdfm /currentdistillerparams
  45. where{pop currentdistillerparams dup /CoreDistVersion known{
  46. /CoreDistVersion get}{0}ifelse dup braindeaddistill le{
  47. (WARNING: switching to old pdfm because version =)print == /pdfmold}{
  48. pop /pdfmnew}ifelse load}{/pdfmark where{pop{dup type /stringtype eq{
  49. externalhandler}{2 copy mark 3 1 roll{pdfmnew}stackstopped{2 copy mark 3
  50. 1 roll{pdfmold}stackstopped{(WARNING: pdfm disabled\012)print /pdfm{pop
  51. pop}store}{(WARNING: new pdfm failed, switching to old pdfm\012)print
  52. /pdfm /pdfmold load store}ifelse}{/pdfm /pdfmnew load store}ifelse pop
  53. pop}ifelse}}{{pop pop}}ifelse}ifelse bind def}ifelse end def
  54.